.NET Wrapper Sink block

The .NET Wrapper blocks allow the user to integrate external .NET objects within the Architect environment. In this way, the user can add custom functionality, their own code, or third party libraries and objects to their solution.

Note that this connector may or may not be available on the user palette, according to your license type.

NOTE: CSense provides secure native blocks and operations for building analytics and solutions. The native capabilities provided by CSense can be extended by making use of this feature. When making use of this feature, please ensure that you have validated your extended functions to ensure that they perform as intended and do not introduce stability or security risks to your production system. Do not use scripts or components from untrusted sources.

Description

External .NET sink objects that contain custom functionality (e.g., own code, libraries, or components) can be integrated within the Architect environment using the .NET Wrapper Sink block. Since Architect provides and manages runtime scheduling and interfacing, the third party .NET object only has to focus on its own functionality. This object must implement the ISinkBlock interface, the integrated object can then interface and communicate with any other Architect block.

The ISinkBlockinterface is defined in the .NETWrapperInterface.DLL assembly. This interface is in the CSense.CSenseWrapper namespace. This assembly also contains a group of enumerations, classes and interfaces that can be used by, and passed to your object through the interface. These classes are defined in the Wrapper interface assembly.

These objects can be written in any .NET language with the only requirement that it supports .NET 2.0 or later. All objects are contained in .NET class library assembly files (DLL files) and need to be registered in Windows for clients to find them.

NOTE: One class library may contain multiple .NET objects.

.NET wrapper sink block

The ISinkBlock Interface:

All four interfaces have almost the same methods, they just differ in parameters. These methods can be explored in greater detail in the Block interface overview.

This interface is required by the .NET Wrapper Sink block. This interface is used when your object will only take input fields and not generate any outputs. The interface is defined as:

public interface ISinkBlock

{

    UserControl GetConfigurationControl(InputFields inputFields);

    void Configure(InputFields inputFields, UserControl control);

    void CheckRunnability(InputFields inputFields, IRunnabilityResult result);

    void ExecutionStarted();

    void Execute(DateTime executeTime, InputValues inputs);

    void ExecutionStopped();

}

While in design-time the .NET Wrapper Sink's operation is as follows:

  • Retrieve and configure the user control

  • Create all output fields the block will generate

  • Test runnability and return runnabilty result

While in runtime the .NET Wrappers’s operation is as follows:

  • Notify object that execution has started

  • On every execution the input values may have change and therefore the output values must be re-calculated.

  • Notify object that execution has stopped and cleanup is necessary.

NOTE: These operations are explained in the Block interface overview.

Block Type

Historical IO

Input/Output ports

The .NET Wrapper Sink block has one input port and no output port. The contents of the input port are dependent on the object encapsulated by the.NET Wrapper Sink block. The InputFields and InputValues containers are read-only containers. You cannot modify these containers.

Runnability

The minimum requirements for runnability on the .NET Wrapper Sink block are:

  • a valid .NET DLL object file is loaded

  • a valid .NET object is selected

  • Object requires a connection to a valid source.

Terminology

  • .NET: The .NET framework is a large library of pre-coded solutions to common programming problems and manages the execution of programs written specifically for the framework.

  • .NET object: an component create within the .NET Framework

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025